home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)tj.d64
/
SCROLL.LEFT.ASM
< prev
next >
Wrap
Assembly Source File
|
2009-01-18
|
2KB
|
60 lines
opt nolist ;scroll.left.asm Sep 27,1983. Avygdor Moise
xdef write_right_column
xdef scroll_left
blank equ 32
line_length equ 80
screen_length equ 16
screen_top equ $8000+((25-10)/2)*line_length
right_column equ screen_top+79
;-------------------------------------------------------------------------------
write_right_column equ *
bsr scroll_left
pshs y,x,d ;d = address of string
tfr d,x
ldy #right_column
loop
ldb ,x+
quif eq
stb ,y
leay 80,y
endloop
puls d,x,y
rts
;-------------------------------------------------------------------------------
scroll_left equ *
pshs y,x,d
lda #screen_length-1 ;number of lines to move
ldx #screen_top+line_length ;top left corner
ldb #blank
;blank out first column on each line
loop
stb ,x
leax 80,x
deca
until eq
;move all lines one position left
ldx #screen_top
ldy #screen_length*line_length-1 ;number of bytes to move
loop
ldb 1,x
stb ,x+
leay -1,y
until eq
ldb #blank
stb ,x ;blank out the last byte
puls d,x,y
rts
end